<template>
  <div class="app-container">
    <el-scrollbar style="height: 100%;">
      <div class="echarts-item">
        <div class="echarts-title">
          {{ echartsData.ssh.title }}
        </div>
        <el-row :gutter="15" class="echarts-row" style="height: 430px;">
          <el-col :span="24">
            <line-bar :echartsData="echartsData.ssh"></line-bar>
          </el-col>
        </el-row>
      </div>


    </el-scrollbar>
  </div>
</template>

<script>
  import LineBarPie from '@/components/echarts/LineBarPie'  //客服
  import LineBar from '@/components/echarts/LineBar'  //客服
  import Pie from '@/components/echarts/Pie'  //客服
  export default {
    mounted() {
      this.$store.commit('rdefaultActive', 'ssh')
    },
    components: {
      LineBarPie,
      LineBar,
      Pie
    },
    data() {
      return {
        n: 2,
        echartsData: {
          ssh: {
            title: '水损耗分析报表',
            dataset: [
              ['product', '2018-04', '2018-05', '2018-06', '2018-07', '2018-08', '2018-09', '2018-10', '2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04'],
              ['东郊水厂水损耗', 48.21,51.38,49.33,27.19,46.35,4.7,7.46,26.66,13.79,24.46,48.32,35.38,27.43],
              ['北郊水厂水损耗', 23.28,9.39,20.89,11.34,19.94,7.73,19.85,31.65,10.5,23.03,21,8.63,1.65],
              ['东郊水厂损耗率', 4.94,5.19,5.29,2.84,4.86,0.49,0.79,2.89,1.5,2.71,5.18,3.63,2.81],
              ['北郊水厂损耗率', 5.67,2.07,4.64,2.6,4.47,1.83,4.84,6.84,2.43,5.03,4.58,2.01,0.36],
            ],
            pieLength: 2,
            unitName: ['km³', '%'],
            yAxis: [
              {
                min: 0,
                max: 80,
                name: '水损耗(kw/m³)',
                formatter: '{value}'
              },
              {
                name: '损耗率(%)',
                min: 0,
                max: 8,
                formatter: '{value}'
              }
            ]
          }
        }
      }
    },
    methods: {}
  }
</script>

<style scoped>

</style>
